From d9894a8350751e3792cf19a1e056dd29b37c6e96 Mon Sep 17 00:00:00 2001 From: tsteven4 <13596209+tsteven4@users.noreply.github.com> Date: Wed, 5 Jan 2022 17:36:02 -0700 Subject: [PATCH] only support changing gpsbabel.org location at build generation time. (#813) --- CMakeLists.txt | 16 +--------------- GPSBabel.pro | 5 +---- tools/.gitignore | 1 - tools/make_gpsbabel_org_wrapper.sh.in | 5 ----- 4 files changed, 2 insertions(+), 25 deletions(-) delete mode 100755 tools/make_gpsbabel_org_wrapper.sh.in diff --git a/CMakeLists.txt b/CMakeLists.txt index 29eed0499..19b93b3e9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -520,22 +520,8 @@ endif() if(CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR) set(WEB "../babelweb" CACHE PATH "Path where the documentation will be stored for www.gpsbabel.org.") - # If using a makefile generator WEB can be overridden on the make - # command line, e.g. make gpsbabel.org WEB=/tmp. If not overridden on - # the make command line, or not using a makefile generator, or if using - # "cmake --build dir --target gpsbabel.org", then the cache variable - # WEB will be used. The cache variable can be overridden in the usual - # way when configuring, i.e. "cmake dir -DWEB:PATH=/tmp". - - # FIXME: Is overriding WEB on the make command line worth the trouble of - # using configure_file to build a wrapper script? - - configure_file(${CMAKE_SOURCE_DIR}/tools/make_gpsbabel_org_wrapper.sh.in - ${CMAKE_BINARY_DIR}/tools/make_gpsbabel_org_wrapper.sh - @ONLY - NEWLINE_STYLE LF) add_custom_target(gpsbabel.org - ${CMAKE_BINARY_DIR}/tools/make_gpsbabel_org_wrapper.sh + ${CMAKE_BINARY_DIR}/tools/make_gpsbabel_org.sh ${WEB} ${DOCVERSION} DEPENDS gpsbabel gpsbabel.pdf) endif() diff --git a/GPSBabel.pro b/GPSBabel.pro index 013604131..98b25c7d2 100644 --- a/GPSBabel.pro +++ b/GPSBabel.pro @@ -397,10 +397,7 @@ equals(PWD, $${OUT_PWD}) { !defined(WEB, var) { WEB = ../babelweb } - # Allow WEB to be overridden when running make. - # DOCVERSION must be overridden at qmake time as it also affects the object code. - gpsbabel.org.commands += web=\$\${WEB:-$${WEB}}; - gpsbabel.org.commands += tools/make_gpsbabel_org.sh \"\$\${web}\" $$shell_quote($$DOCVERSION); + gpsbabel.org.commands += tools/make_gpsbabel_org.sh $$shell_quote($$WEB) $$shell_quote($$DOCVERSION); } else { gpsbabel.org.commands += echo "target gpsbabel.org is not supported for out of source builds."; gpsbabel.org.commands += exit 1; diff --git a/tools/.gitignore b/tools/.gitignore index 9b2452f41..9ceead247 100644 --- a/tools/.gitignore +++ b/tools/.gitignore @@ -1,2 +1 @@ /mkcapabilities -/make_gpsbabel_org_wrapper.sh diff --git a/tools/make_gpsbabel_org_wrapper.sh.in b/tools/make_gpsbabel_org_wrapper.sh.in deleted file mode 100755 index fcf2b068a..000000000 --- a/tools/make_gpsbabel_org_wrapper.sh.in +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh -set -e - -web=${WEB:-@WEB@} -"@CMAKE_SOURCE_DIR@/tools/make_gpsbabel_org.sh" "${web}" "@DOCVERSION@" -- 2.30.2